public class xinbaodao {
    public static void main(String[] args) {
        int[] a = new int[10];
        a[0] = 1;a[1] = 2;a[2] = 0;
        for (int i = 3; i < a.length; i++) {
            if( i!= 5)a[i] = a[i-1] + a[i-2] + a[i-3];
        }
        System.out.printf("%d",a[9]);
        for (int i : a) {
            System.out.println(i);
        }
    }
}
